<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>乐码在线智慧平台-教师考评</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="../../static/favicon.ico" th:href="@{/static/favicon.ico}">
    <link href="../../static/css/bootstrap.min.css?v=3.3.6" th:href="@{/static/css/bootstrap.min.css(v='3.3.6')}" rel="stylesheet">
    <link href="../../static/css/font-awesome.css?v=4.4.0" th:href="@{/static/css/font-awesome.css(v='4.4.0')}" rel="stylesheet">
    <link href="../../static/css/plugins/bootstrap-table/bootstrap-table.min.css" th:href="@{/static/css/plugins/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
    <link href="../../static/css/animate.css" th:href="@{/static/css/animate.css}" rel="stylesheet">
    <link href="../../static/css/style.css?v=4.1.0" th:href="@{/static/css/style.css(v='4.1.0')}" rel="stylesheet">
    <!-- bootstrap-datepicker -->
    <link href="../../static/css/plugins/datapicker/datepicker3.css" th:href="@{/static/css/plugins/datapicker/datepicker3.css}" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="../../static/css/plugins/sweetalert/sweetalert.css" th:href="@{/static/css//plugins/sweetalert/sweetalert.css}" rel="stylesheet">
    <!--switchery-->
    <link href="../../static/css/plugins/switchery/switchery.css" th:href="@{/static/css//plugins/switchery/switchery.css}" rel="stylesheet">

    <style type="text/css">
        .table > thead > tr > th    {
            color: #2a62bc;
        }

    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight animated fadeInRight">
    <div class="pull-left col-md-12">
        <form class="form-inline" style="margin:15px -10px">
            <div class="form-group col-md-2">
                <label>班级名称:</label>
                <input type="text" class="form-control" id="name" >
            </div>
            <div class="form-group col-md-2">
                <label>&nbsp;&nbsp;所属机构:</label>
                <div class="input-group">
                    <input type="text" class="form-control org" id="org">
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        </ul>
                    </div>
                    <!-- /btn-group -->
                </div>
            </div>
            <div class="form-group col-md-2">
                <label>&nbsp;&nbsp; 所属分支:</label>
                <div class="input-group">
                    <input type="text" class="form-control branch" id="branch">
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        </ul>
                    </div>
                    <!-- /btn-group -->
                </div>
            </div>
            <div class="form-group col-md-2">
                <label>&nbsp;&nbsp; 专业方向:</label>
                <div class="input-group">
                    <input type="text" class="form-control major" id="major">
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        </ul>
                    </div>
                    <!-- /btn-group -->
                </div>
            </div>
            <div class="form-group col-md-2">
                <label>老师名称:</label>
                <input type="text" class="form-control" id="t_name" >
            </div>
            <input type="button" class="btn btn-primary" value="查询" id="queryBtn" style="margin-top: 23px;margin-left: -15px"/>
        </form>
    </div>


    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-md-10 table">
            <div class="col-md-2" style="margin: 20px  -15px">
                <div class="btn-group" role="group">
                    <a type="button" class="btn btn-info" data-toggle="modal" data-target="#exportModal">导出</a>
                </div>
                <div class="btn-group" role="group" aria-label="...">
                    <a  type="button" class="btn btn-success" id="add-btn" data-toggle="modal" data-target="#addModal" >添加</a>
                </div>
                <div class="btn-group" role="group" aria-label="...">
                    <a  type="button" class="btn btn-danger" id="remove" >删除</a>
                </div>
            </div>
            <!--  bootstrap table  -->
            <table id="tb_major" class="table table-striped table-hover table-bordered"></table>
        </div>
    </div>
</div>


<!-- 导出模态框  -->
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" >
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <p>确定要导出吗？</p>
        </div>
    </div>
</div>

<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" id="exportModal">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body">
                <h3>确定要导出吗？</h3>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!--add modal-->
<div class="modal fade" id="addModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span class="close" data-dismiss="modal">&times;</span>
                <h3 class="modal-title">添加</h3>
            </div>

            <div class="modal-body" style="min-height: 400px;margin-top: 20px">
                <form action="#" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属机构：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update" >
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属分支：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control branch_update">
                                <div class="input-group-btn" style="z-index:99999!important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属专业：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属班级：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">老师名称：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label right">允许IP：</label>
                        <div class="col-sm-7">
                            <input class="form-control changeID" type="text" placeholder="例如：192.168.1" disabled/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label date">开始时间：</label>
                        <div class="col-sm-7  ">
                            <input type="text" id="startDate" class="form-control mydate" value="2020-6-2"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label date">结束时间：</label>
                        <div class="col-sm-7  ">
                            <input type="text" id="endDate" class="form-control mydate" value="2020-6-2"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">考评模板：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="radio col-md-offset-1">
                        <label>
                            <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1">
                            <p style="color: red;margin-top: -7px">限定IP网段，一个IP地址只能提交 一次</p>
                        </label>
                    </div>
                    <div class="radio col-md-offset-1">
                        <label>
                            <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2" checked>
                            <p style="color: red;margin-top: -7px">不限定IP网段，任何IP都可以提交</p>
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary" data-dismiss="modal">关闭</button>
                <button class="btn btn-primary" id="add_sure">确定</button>
            </div>
        </div>
    </div>
</div>

<!--updateModal modal-->
<div class="modal fade" id="updateModal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span class="close" data-dismiss="modal">&times;</span>
                <h3 class="modal-title">修改</h3>
            </div>

            <div class="modal-body" style="min-height: 400px;margin-top: 20px">
                <form action="#" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属机构：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属分支：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control branch_update">
                                <div class="input-group-btn" style="z-index:99999!important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属专业：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">所属班级：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">老师名称：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label right">允许IP：</label>
                        <div class="col-sm-7">
                            <input class="form-control changeID" type="text" placeholder="例如：192.168.1" disabled></input>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label ">开始时间：</label>
                        <div class="col-sm-7  ">
                            <input type="text" id="update_startDate" class="form-control mydate" value="2020-6-2"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label ">结束时间：</label>
                        <div class="col-sm-7  ">
                            <input type="text" id="update_endDate" class="form-control mydate" value="2020-6-2"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right">考评模板：</label>
                        <div class="col-sm-7">
                            <div class="input-group">
                                <input type="text" class="form-control org_update">
                                <div class="input-group-btn" style="z-index:99999 !important;">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="radio col-md-offset-1">
                        <label>
                            <input type="radio" name="optionsRadios" id="optionsRadios3" value="option1">
                            <p style="color: red; margin-top: -7px">限定IP网段，一个IP地址只能提交 一次</p>
                        </label>
                    </div>
                    <div class="radio col-md-offset-1">
                        <label>
                            <input type="radio" name="optionsRadios" id="optionsRadios4" value="option2" checked>
                            <p style="color: red;margin-top: -7px">不限定IP网段，任何IP都可以提交</p>
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-primary" data-dismiss="modal">关闭</button>
                <button class="btn btn-primary" id="update_sure">确定</button>
            </div>
        </div>
    </div>
</div>

<!--  审核模态框  -->
<div class="modal fade" id="checkModal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">详情</h4>
            </div>
            <div class="modal-body">
            <!--     这是体部         -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#pollinfo" aria-controls="info" role="tab" data-toggle="tab">考评信息</a></li>
                    <li class=""><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 选项得分</a></li>
                    <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">学生建议</a></li>
                </ul>

                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="pollinfo">
                        <form class="form-horizontal" role="form" id="pollinfo-form" style="padding: 10px" action="#" method="post">
                            <div class="form-group">
                                <label class="col-sm-7 ">教师名称：Alan</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-7 ">班级名称：Web前端开发</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-7 ">考评人数：20</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-7 ">总平均分：8</label>
                            </div>
                        </form>
                    </div><!--end of tab1-->
                    <div id="tab-1" class="tab-pane">
                        <div class="panel-body">
                           <table id="score-option" class="table table-bordered table-striped table-striped option">

                           </table>
                        </div>
                    </div><!--end of tab2-->
                    <div id="tab-2" class="tab-pane">
                        <div class="panel-body">
                            <table class="table table-striped table-bordered table-bordered suggest" id="suggest-table">

                            </table>
                        </div>
                    </div><!--end of tab3-->
                </div>

            </div><!--体部结束-->
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i>&nbsp;关闭</button>
                <button type="button" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i>&nbsp;已审核不可重复提交</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- detailModal -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">详情</h4>
            </div>
            <div class="modal-body">
                <!--     这是体部         -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#d-pollinfo" aria-controls="info" role="tab" data-toggle="tab">考评信息</a></li>
                    <li class=""><a data-toggle="tab" href="#d-tab-1" aria-expanded="true"> 选项得分</a></li>
                    <li class=""><a data-toggle="tab" href="#d-tab-2" aria-expanded="false">学生建议</a></li>
                </ul>

                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="d-pollinfo">
                        <form class="form-horizontal" role="form" id="d-pollinfo-form" style="padding: 10px" action="#" method="post">
                            <div class="form-group">
                                <!--<input type="hidden" id="d-inputId" name="id">-->
                                <label class="col-md-7 ">教师名称：周国兵</label>
                                <!--<div class="col-sm-9">
                                    <input type="text" id="d-teacher_name" name="teacher_name" class="form-control" >
                                </div>-->
                            </div>
                            <div class="form-group">
                                <label class="col-md-7 ">班级名称：Java全栈开发</label>
                                <!--<div class="col-sm-9">
                                    <input type="text" id="d-clazz_name" name="clazz_name" class="form-control" >
                                </div>-->
                            </div>
                            <div class="form-group">
                                <label class="col-md-7 ">考评人数：18</label>
                                <!--<div class="col-sm-9">
                                    <input type="text" id="d-number" name="number" class="form-control" >
                                </div>-->
                            </div>
                            <div class="form-group">
                                <label class="col-md-7 ">总平均分：7</label>
                                <!--<div class="col-sm-9">
                                    <input type="text" id="d-score" name="score" class="form-control" >
                                </div>-->
                            </div>
                        </form>
                    </div><!--end of tab1-->
                    <div id="d-tab-1" class="tab-pane">
                        <div class="panel-body">
                            <table id="d-score-option" class="table table-bordered table-striped table-striped option">
                            </table>
                        </div>
                    </div><!--end of tab2-->
                    <div id="d-tab-2" class="tab-pane">
                        <div class="panel-body">
                            <table class="table table-striped table-bordered table-bordered suggest" id="d-suggest-table">
                            </table>
                        </div>
                    </div><!--end of tab3-->
                </div>
            </div><!--体部结束-->
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- 全局js -->
<script src="../../static/js/jquery.min.js?v=2.1.4" th:href="@{/static/js/jquery.min.js('v=2.1.4')}"></script>
<script src="../../static/js/bootstrap.min.js?v=3.3.6" th:href="@{/static/js/bootstrap.min.js('v=3.3.6')}"></script>

<!-- 自定义js -->
<script src="../../static/js/content.js?v=1.0.0" th:href="@{/static/js/content.js('v=1.0.0')}"></script>


<!-- Bootstrap table -->
<script src="../../static/js/plugins/bootstrap-table/bootstrap-table.min.js"
        th:href="@{/static/js/plugins/bootstrap-table/bootstrap-table.min.js}"></script>
<script src="../../static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"
        th:href="@{/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js}"></script>
<script src="../../static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"
        th:href="@{/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
<!--动态搜索-->
<script src="../../static/js/plugins/suggest/bootstrap-suggest.min.js"
        th:href="@{/static/js/plugins/suggest/bootstrap-suggest.min.js}"></script>
<!-- Sweet alert -->
<script src="../../static/js/plugins/sweetalert/sweetalert.min.js"
        th:href="@{/static/js/plugins/sweetalert/sweetalert.min.js}"></script>
<!-- Switchery -->
<script src="../../static/js/plugins/switchery/switchery.js"  th:href="@{/static/js/plugins/switchery/switchery.js}"></script>
<!-- Data picker -->
<script src="../../static/js/plugins/datapicker/bootstrap-datepicker.js" th:href="@{/static/js/plugins/datapicker/bootstrap-datepicker.js}"></script>
<script src="../../static/js/plugins/datapicker/bootstrap-datepicker.zh-CN.min.js" th:href="@{/static/js/plugins/datapicker/bootstrap-datepicker.zh-CN.min.js}"></script>

<script>
    $(function () {
        /*时间控件配置*/
        $(".mydate").datepicker({
            language: "zh-CN",
            clearBtn: true,//清除
            autoclose: true,
            todayHighlight: true,
            format: 'yyyy-mm-dd',
            todayBtn: false,//今日按钮
            startDate: '1970-1-1', //与你自己设置的格式一致yyyy-mm-dd，未设置的话与默认格式一致mm/dd/yyyy
            endDate: '2070-1-1'
        });
    });
</script>

<script>
    $(function () {
        //初始化表格
        var init = new initdata();
        init.Init();
        //点击按钮开始搜索
        $("#queryBtn").click(function () {
            var org = $(".org").val();
            var branch = $(".branch").val();
            var major = $(".major").val();
            //判断条件是否存在
            if (org=="" && branch=="" && major==""){
                alert("请选择查询条件");
                return ;
            }
            alert(org+branch+major);
            //执行查询
            init.Init();
        });
        //删除所有
        $('#remove').click(function () {
            // 删除按钮事件
            if (!confirm("是否确认删除？"))
                return;
            var rows = $("#tb_major").bootstrapTable('getSelections');// 获得要删除的数据
            if (rows.length == 0) {// rows 主要是为了判断是否选中，下面的else内容才是主要
                alert("请先选择要删除的记录!");
                return;
            } else {
                var ids = new Array();// 声明一个数组 该数组将要存放所有选择的id
                $(rows).each(function() {// 通过获得别选中的来进行遍历
                    ids.push(this.id);// cid为获得到的整条数据中的一列
                });
                //TODO 发送ajax请求
                alert(ids);
            }
        });
        //动态搜索选择下拉框
        testdataBsSuggest1;
        testdataBsSuggest2;
        testdataBsSuggest3;
        //添加事件
        $('#add_sure').click(function () {
            alert("添加成功");
        });
        //更新时间
        $('#update_sure').click(function () {
            alert("更新成功");
        });

    });
    var testdataBsSuggest1 = $(".org").bsSuggest({
        indexId: 2, //data.value 的第几个数据，作为input输入框的内容
        indexKey: 1, //data.value 的第几个数据，作为input输入框的内容
        //TODO 通过json显示数据
        data: {
            'value': [
                {
                    'id': "",
                    'word': '黑马程序员',
                },
                {
                    'id': "",
                    'word': '青英',
                },
            ]
        }
    });
    var testdataBsSuggest2 = $(".branch").bsSuggest({
        indexId: 2, //data.value 的第几个数据，作为input输入框的内容
        indexKey: 1, //data.value 的第几个数据，作为input输入框的内容
        //TODO 通过json显示数据
        data: {
            'value': [
                {
                    'id': "",
                    'word': 'Java',
                },
                {
                    'id': "",
                    'word': 'C++',
                },
            ]
        }
    });

    var testdataBsSuggest3 = $(".major").bsSuggest({
        indexId: 2, //data.value 的第几个数据，作为input输入框的内容
        indexKey: 1, //data.value 的第几个数据，作为input输入框的内容
        //TODO 通过json显示数据
        data: {
            'value': [
                {
                    'id': "",
                    'word': 'mysql',
                },
                {
                    'id': "",
                    'word': 'orcal',
                },
            ]
        }
    });

    var initdata = function () {
        var init = new Object();
        init.Init = function () {
            //加载之前先格式化 放在查询的时候起冲突
            $("#tb_major").bootstrapTable('destroy')
            $("#tb_major").bootstrapTable({
                url: '../../static/js/demo/evaluation/teacher.json',
                method: 'get',
                striped: true,  //是否显示行间隔色
                cache: false, //是否使用缓存
                pagination: true, //是否分页
                pageSize: 5,  //每页记录行数
                uniqueId: 'id',  //唯一id
                pageList: [5, 10, 20],
                queryParams: init.queryParams, // 传递参数
                columns: [{
                    field: "coo",
                    checkbox: true,
                },  {
                    field: 'id',
                    title: '序号'
                }, {
                    field: 'tName',
                    title: '老师名称'
                }, {
                    field: 'clazz',
                    title: '班级'
                },{
                    field: 'adress',
                    title: '考评地址'
                },{
                    field: 'grade',
                    title: '考评成绩'
                },{
                    field: 'time',
                    title: '有效期'
                },{
                    field: 'status',
                    title: '状态'
                }, {
                    field: 'operator',
                    title: "操作",
                    align: "center",
                    valign: "middle",
                    width:  "15%",
                    formatter: actionFormatter, //方法调用
                    events: {
                        'click button[title=删除]': function (e, value, row, index) {
                            // console.log(row.id);
                            swal({
                                title: "您确定要删除这条信息吗",
                                text: "删除后将无法恢复，请谨慎操作！",
                                type: "warning",
                                showCancelButton: true,
                                confirmButtonColor: "#DD6B55",
                                confirmButtonText: "删除",
                                closeOnConfirm: false
                            }, function () {
                                //TODO 发送ajax请求
                                swal("删除成功！", "您已经永久删除了这条信息。", "success");
                            });
                        },

                    }
                }]

            });
        };
        init.queryParams = function (params) {
            console.log(params);
            console.log($('#name').val());
            return {
                offset: params.offset,//从数据库第几条记录开始
                limit: params.limit,//找多少条
                org: $("#org").val(),
                branch: $("#branch").val(),
                major:$("#major").val()
            };
        }
        //操作栏的格式化
        function actionFormatter(value, row, index) {
            var id = value;
            var result = "";
            // console.log(row.id);
            // console.log(row.name+"--"+index +"--"+value);
            return '<button id="+id+" type="button" class="btn btn-white btn-sm" data-toggle="modal" data-target="#checkModal" title="审核">' +
                '<i class="glyphicon glyphicon-check text-success"/> </button>'+
                '<button id="+id+" type="button" class="btn btn-white btn-sm" data-toggle="modal" data-target="#detailModal" ' +
                'title="查看详情"><i class="glyphicon glyphicon-exclamation-sign text-info"/></button>'+
                '<button id = "+id+" type = "button" class = "btn btn-white btn-sm" title="修改" ' +
                'data-toggle="modal" data-target="#updateModal"> <i class="glyphicon glyphicon-edit"/> </button>' +
                '<button id = "+id+" type = "button" class = "btn btn-white btn-sm" title="删除"> <i class="glyphicon glyphicon-trash text-danger"/> </button>';
        };

        return init;
    }
</script>

<script>
    /*模态框中的bootstraptable初始化*/
    $(function () {
        $(".option").bootstrapTable({
            url: '../../static/js/demo/evaluation/option.json',
            toolbar : '#toolbar', // 工具按钮用哪个容器
            method:'get',
            pagination : true,
            cache:false,
            sortable : true, //是否启用排序
            sortOrder : "asc", // 排序方式
            sidePagination : "client", // 分页方式：client客户端分页，server服务端分页（*）
            pageNumber: 1,
            pageSize:10,
            pageList: [10, 25, 50, 100],
            uniqueId: "ID",
            columns: [{
                field:'options',
                title:'考评选项'
            },{
                field:'score',
                title: '平均分'
            }]
        });

        $(".suggest").bootstrapTable({
            // url: '../../static/js/demo/evaluation/suggest.json',
            toolbar : '#toolbar', // 工具按钮用哪个容器
            method:'get',
            pagination : true,
            cache:false,
            sortable : true, //是否启用排序
            sortOrder : "asc", // 排序方式
            sidePagination : "client", // 分页方式：client客户端分页，server服务端分页（*）
            pageNumber: 1,
            pageSize:10,
            pageList: [10, 25, 50, 100],
            uniqueId: "ID",
            data:[{
                "id": 1,
                "suggest": "少吃零食多睡觉"
            },{
                "id": 2,
                "suggest": "少吃零食多睡觉"
            },{
                "id": 3,
                "suggest": "少吃零食多睡觉"
            },{
                "id": 4,
                "suggest": "少吃零食多睡觉"
            },{
                "id": 5,
                "suggest": "少吃零食多睡觉"
            }],
            columns: [{
                field:'id',
                title:'序号'
            },{
                field:'suggest',
                title: '考评建议'
            }]
        });
    })
</script>

<!--  改变表单允许IP输入域的状态 -->
<script>
    $(function () {
        $('input[type=radio][name=optionsRadios]').change(function () {
            console.log(this.value);
            if (this.value == 'option1'){
                $(".changeID").attr("disabled",false);
                // alert("选项1")
            }else if(this.value = 'option2'){
                // alert("选项2")
                $(".changeID").attr("disabled",true);
            }
        })
    })
</script>
</body>
</html>